﻿<%@ Page Title="Strategic Asset Management Las Vegas: ProjectManager" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
    CodeBehind="ProjectManagerList.aspx.cs" Inherits="LenderClearingHouse.ProjectManagerList" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="ListFilterControl.ascx" TagName="ListFilterControl" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageHeader" runat="server">
    GC Grid
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="grid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>"
        SelectCommand="getRehab" SelectCommandType="StoredProcedure" 
        CancelSelectOnNullParameter="False" onselecting="dsLvreo_Selecting">
            <SelectParameters>
                <asp:Parameter ConvertEmptyStringToNull="False" Name="Apn" Type="String" />
                <asp:Parameter ConvertEmptyStringToNull="False" Name="PropLocation" Type="String" />
                <asp:Parameter ConvertEmptyStringToNull="False" Name="Zip" Type="String" />
                <asp:Parameter ConvertEmptyStringToNull="False" Name="PMId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>

    <uc1:ListFilterControl ID="listFilter" runat="server" />
    <br />
    <div class="panel7">
        <telerik:RadGrid ID="grid" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource" Width="1160px"
            AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
            PageSize="10" ShowFooter="True" ShowStatusBar="True" 
            onupdatecommand="grid_UpdateCommand" onitemdatabound="grid_ItemDataBound">
            <GroupingSettings CaseSensitive="False" />
            <ClientSettings>
                <Scrolling ScrollHeight="500px" AllowScroll="True" UseStaticHeaders="True"/>
            </ClientSettings>
            <HeaderStyle Width="150px" />
            <MasterTableView DataSourceID="SqlDataSource" DataKeyNames="PropertyId">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderStyle-Width="20px">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn DataField="InvestorName" HeaderText="Purchaser"
                        SortExpression="InvestorName" UniqueName="InvestorName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" UniqueName="StartDate"
                        DataFormatString="{0:MM/dd/yyyy}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Apn" HeaderText="Apn" SortExpression="Apn" UniqueName="Apn">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PropertyLocation" HeaderText="Address"
                        SortExpression="PropertyLocation" UniqueName="Address">
                    </telerik:GridBoundColumn>                                        
                    <telerik:GridBoundColumn DataField="ZipCode" HeaderText="Zip" SortExpression="ZipCode"
                        UniqueName="ZipCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RehabStatus" HeaderText="Rehab Status" SortExpression="RehabStatus"
                        UniqueName="RehabStatus">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RehabStartDate" DataType="System.DateTime" HeaderText="Rehab Start Date"
                        SortExpression="RehabStartDate" UniqueName="RehabStartDate" 
                        DataFormatString="{0:MM/dd/yyyy}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="EstRehabCompDate" DataType="System.DateTime" HeaderText="Est Rehab Comp Date"
                        SortExpression="EstRehabCompDate" UniqueName="EstRehabCompDate" DataFormatString="{0:MM/dd/yyyy}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ActualCompDate" DataType="System.DateTime" HeaderText="Actual Comp Date"
                        SortExpression="ActualCompDate" UniqueName="ActualCompDate" 
                        DataFormatString="{0:MM/dd/yyyy}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CurrentRehabCosts" DataType="System.DateTime" HeaderText="Current Rehab Costs"
                        SortExpression="CurrentRehabCosts" UniqueName="CurrentRehabCosts" 
                        DataFormatString="{0:c}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="NotesStatus" HeaderText="Notes - Status" SortExpression="NotesStatus"
                        UniqueName="NotesStatus" HeaderStyle-Width="200px">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RehabEstimate" DataType="System.DateTime" HeaderText="Rehab Estimate"
                        SortExpression="RehabEstimate" UniqueName="RehabEstimate" 
                        DataFormatString="{0:c}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RehabMiscCosts" DataType="System.DateTime" HeaderText="Misc Costs"
                        SortExpression="RehabMiscCosts" UniqueName="RehabMiscCosts" 
                        DataFormatString="{0:c}">
                    </telerik:GridBoundColumn>
                    
                    <telerik:GridBoundColumn DataField="Stories" HeaderText="Stories" SortExpression="Stories" UniqueName="Stories">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ConstructYear" HeaderText="ConstYear" SortExpression="ConstructYear" UniqueName="ConstructYear">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="TotalSqft" HeaderText="TotalSqft" SortExpression="TotalSqft" UniqueName="TotalSqft">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LotSize" HeaderText="LotSize" SortExpression="LotSize" UniqueName="LotSize">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="Bedrooms" HeaderText="Bed" SortExpression="Bedrooms" UniqueName="Bedrooms">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Bathrooms" HeaderText="Bath" SortExpression="Bathrooms" UniqueName="Bathrooms">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="GarageSqft" HeaderText="GarageSqft" SortExpression="GarageSqft" UniqueName="GarageSqft">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Pool" HeaderText="Pool" SortExpression="Pool" UniqueName="Pool">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Spa" HeaderText="Spa" SortExpression="Spa" UniqueName="Spa">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="PropertyId" DataType="System.Int64" HeaderText="PropertyId"
                        SortExpression="PropertyId" UniqueName="PropertyId" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PMId" DataType="System.Int64" HeaderText="PMId"
                        SortExpression="PMId" UniqueName="PMId" Visible="False">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="ProjectManagerEditControl.ascx">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="True" />
            </MasterTableView>
            <PagerStyle AlwaysVisible="True" />
        </telerik:RadGrid>
    </div>
</asp:Content>
